package com.goods.business.service;

import com.goods.common.error.BusinessException;
import com.goods.common.model.business.ProductCategory;
import com.goods.common.response.ResponseBean;
import com.goods.common.vo.business.ProductCategoryTreeNodeVO;
import com.goods.common.vo.system.PageVO;

import java.util.List;

/**
 * Title:
 * Author: fusu
 * DateTime:  2023/3/24
 * Description:
 **/
public interface ProductCategoryService {
    /**
     * @return com.goods.common.vo.system.PageVO<com.goods.common.vo.business.ProductCategoryTreeNodeVO>
     * @Author: fusu
     * @Description: 分页查询物资类别（封装子节点）
     * @DateTime:10:48 2023/3/24
     * @params: [pageNum, pageSize]
     */
    PageVO<ProductCategoryTreeNodeVO> suppliesCategoryTree(Integer pageNum, Integer pageSize);

    /**
     * @return void
     * @Author: fusu
     * @Description: 物资分类列表添加
     * @DateTime:11:44 2023/3/24
     * @params: [productCategory]
     */
    void addProductCategory(ProductCategory productCategory);

    /**
     * @param pcId
     * @return com.goods.common.model.business.ProductCategory
     * @Author: fusu
     * @Description: 物资分类列表根据id获取
     * @DateTime:11:51 2023/3/24
     * @params: []
     */
    ProductCategory getProductCategory(Long pcId);

    /**
     * @return com.goods.common.vo.business.ProductCategoryTreeNodeVO
     * @Author: fusu
     * @Description: 获取分类树
     * @DateTime:14:22 2023/3/24
     * @params: []
     */
    List<ProductCategoryTreeNodeVO> getParentCategoryTree();

    /**
     * @return void
     * @Author: fusu
     * @Description: 根据主键id更改分类
     * @DateTime:14:47 2023/3/24
     * @params: [productCategory]
     */
    void updateByPcId(ProductCategory productCategory);

    /**
     * @return void
     * @Author: fusu
     * @Description: 根据主键id删除物资分类
     * @DateTime:14:52 2023/3/24
     * @params: [pcId]
     */
    void deleteByPcId(Long pcId) throws BusinessException;
}
